/*
*
* 地图公共设置
* */

/*
* 地图初始化
* */
var myChart = echarts.init(document.getElementById("map"));
$("#coverGant").removeAttr("_echarts_instance_").removeAttr("style").html("");
$(".write_date").text(NowDay());
var county, allToday, positiveToday, newToday, allPulps, roundTable, allPulpTodayVillage,
    minuteTopTable, tableAdd, tablebuttonMsg, timer, legendShow = true,
    mapType = {
        gjzType1: [],
        gjzType2: [],
        gjzType3: [],
        gjzType4: [],
        gjzType5: [],
        gjzType6: [],
        gjzType7: [],
        gjzType8: [],
        gjzType9: [],
        gjzType10: []
    };

var gunterTypeData = {
    add: "",
    name: ""
};

/*
* setDayStyle
* 设置时间按钮样式
* */
function setDayStyle() {
    var zWrite = $(".write_date").text();
    if (zWrite === NowDay()) {
        $(".select_next").css({display: "none"});
        $(".select_now").css({display: "none"});
    } else {
        var noNowDay = {
            display: "inline-block",
            background: "#06B7E5",
            border: "1px solid #06B7E5",
            color: "#FFF"
        };
        $(".select_next").css(noNowDay);
        $(".select_now").css(noNowDay);
    }
}

/*
* select_date
* 选择日期
* */
$(".select_date").on("click", function () {
    modal_confirm({
        title: '选择日期',
        content: '<div class="cover_data">' +
        '<input type="date" value="' + $(".write_date").text() + '">' +
        '</div>',
        onConfirm: function (event) {
            $(".write_date").text($(".cover_data input").val());
            setDayStyle();
            positivePulpTodayAjax();
            allPulpTodayAjax();
            allPulpAjax();
            newPulpTodayAjax();
            TableChartAjax("", "all", "");
            // GantChartAjax(gunterTypeData.add, gunterTypeData.name,function (item) {
            //     var name = (gunterTypeData.name === "jj") ? "积极浆员" : ((gunterTypeData.name === "new") ? "新浆员" : "当天所有浆员");
            //     initGantt(gunterTypeData.add, name ,item);
            // });
            close_cover();
        }
    });
});

/*
* prevDay
* 上一天
* */
$(".select_prev").on("click", function () {
    $(".write_date").text(getPrevDay($(".write_date").text()));
    setDayStyle();
    allPulpTodayAjax();
    allPulpAjax();
    positivePulpTodayAjax();
    newPulpTodayAjax();
    TableChartAjax("", "all", "");
    // GantChartAjax(gunterTypeData.add, gunterTypeData.name,function (item) {
    //     var name = (gunterTypeData.name === "jj") ? "积极浆员" : ((gunterTypeData.name === "new") ? "新浆员" : "当天所有浆员");
    //     initGantt(gunterTypeData.add, name ,item);
    // });
});

/*
* nextDay
* 下一天
* */
$(".select_next").on("click", function () {
    $(".write_date").text(getNextDay($(".write_date").text()));
    setDayStyle();
    allPulpTodayAjax();
    allPulpAjax();
    positivePulpTodayAjax();
    newPulpTodayAjax();
    TableChartAjax("", "all", "");
    // GantChartAjax(gunterTypeData.add, gunterTypeData.name,function (item) {
    //     var name = (gunterTypeData.name === "jj") ? "积极浆员" : ((gunterTypeData.name === "new") ? "新浆员" : "当天所有浆员");
    //     initGantt(gunterTypeData.add, name ,item);
    // });
});

/*
* nowDay
* 当天
* */
$(".select_now").on("click", function () {
    $(".write_date").text(NowDay());
    setDayStyle();
    allPulpTodayAjax();
    allPulpAjax();
    positivePulpTodayAjax();
    newPulpTodayAjax();
    TableChartAjax("", "all", "");
    // GantChartAjax(gunterTypeData.add, gunterTypeData.name,function (item) {
    //     var name = (gunterTypeData.name === "jj") ? "积极浆员" : ((gunterTypeData.name === "new") ? "新浆员" : "当天所有浆员");
    //     initGantt(gunterTypeData.add, name ,item);
    // });
});

/*
* getCountyArea
* 获取边界线
* */
function getCountyArea() {
    $.ajax({
        url: "json/mapCounty.json",
        dataType: 'json',
        type: 'get',
        success: function (item) {
            county = item;
        },
        error: function (error) {
            alert("县区域请求失败！");
        }
    });
}

getCountyArea();

/*
* newPulpTodayAjax
* 当天新浆员
* */
function newPulpTodayAjax() {
    $.ajax({
        url: "http://60.164.210.223:7577/Nvr/map/gjzDzJwd",
        dataType: 'jsonp',
        type: 'GET',
        data: {
            isRegist: null,
            date: $(".write_date").text()
        },
        success: function (item) {
            newToday = item;
            initMap();
        },
        error: function (error) {
            alert("当天新浆员请求失败！");
        }
    });
}

/*
* positivePulpTodayAjax
* 当天献浆积极的浆员
* */
function positivePulpTodayAjax() {
    $.ajax({
        url: "http://60.164.210.223:7577/Nvr/map/gjzDzJwd",
        dataType: 'jsonp',
        type: 'GET',
        data: {
            isRegist: 1,
            lookBeginGjz: 1,
            date: $(".write_date").text()
        },
        success: function (item) {
            positiveToday = item;
            initMap();
        },
        error: function (error) {
            alert("当天所有浆员请求失败！")
        }
    });
}

/*
*a llPulpTodayAjax
* 当天所有浆员
* */
function allPulpTodayAjax() {
    $.ajax({
        url: "http://60.164.210.223:7577/Nvr/map/gjzDzJwd",
        dataType: 'jsonp',
        type: 'GET',
        data: {
            isRegist: 1,
            date: $(".write_date").text()
        },
        beforeSend: function () {
            placeholder.show(document.body);
        },
        success: function (item) {
            allToday = item;
            initMap();
        },
        error: function (error) {
            alert("当天所有浆员请求失败！");
            placeholder.hide(document.body);
            $(".vii-holder-mask").hide();
        }
    });
}

/*
* allPulpTodayvillageAjax
* 当天所有村落浆员
* */
function allPulpTodayvillageAjax() {
    $.ajax({
        url: "http://60.164.210.223:7577/Nvr/map/getTodayVill",
        dataType: 'jsonp',
        type: 'GET',
        data: {
            date: $(".write_date").text()
        },
        success: function (item) {
            allPulpTodayVillage = item;
        },
        error: function (error) {
            alert("当天所有浆员请求失败！")
        }
    });
}

/*
* allPulpAjax
* 所有浆员
* */
function allPulpAjax() {
    $.ajax({
        url: "http://60.164.210.223:7577/Nvr/map/gjzDzJwd",
        dataType: 'jsonp',
        type: 'GET',
        beforeSend: function () {
            placeholder.show(document.body);
        },
        success: function (item) {
            allPulps = item;
            initMap();
        },
        error: function (error) {
            alert("截止当天所有浆员请求失败！")
            placeholder.hide(document.body);
            $(".vii-holder-mask").hide();
        }
    });
}

/*
* mapTypeAjax
* 全部浆员分类
* */
function mapTypeAjax() {
    $.ajax({
        url: "http://60.164.210.223:7577/Nvr/map/getAllGjzDzJwd",
        dataType: 'jsonp',
        type: 'GET',
        success: function (item) {
            mapType = item;

            console.log(item)

            initMap();
        },
        error: function (error) {
            alert("全部浆员分类请求失败！")
        }
    });
}

/*
* GantChartAjax
* 获取甘特图
* */
function GantChartAjax(add, type, callback) {
    $.ajax({
        url: (type === "jj") ? "http://60.164.210.223:7577/Nvr/map/getJijRegGtt" : "http://60.164.210.223:7577/Nvr/map/getRegGtt",
        dataType: "jsonp",
        type: 'POST',
        scriptCharset: 'utf-8',
        contentType: "application/json;charset=utf-8",
        data: {
            date: $(".write_date").text(),
            address: add,
            isNew: type === "new" ? 1 : 0
        },
        success: function (item) {
            callback(item);
        },
        error: function (error) {
            alert("甘特图请求失败！");
        }
    });
}

/*
* OpenCoverGant
* 打开甘特图
* */
function OpenCoverGant(add, type) {
    $("#cover").fadeIn();
    $("#coverGant").fadeIn();
    $("#cover > .cover-small").css("display", "block");
    GantChartAjax(add, type, function (item) {
        var name = (type === "jj") ? "积极浆员" : ((type === "new") ? "新浆员" : "当天所有浆员");
        initGantt(add, name, item);
    });
}

/*
* OpenCoverTable
* 打开轮次表
* */
function OpenCoverTable(add, type, t) {
    tableAdd = add;
    $("#cover").fadeIn();
    $("#coverTable").fadeIn();
    $("#cover > .cover-small").css("display", "block");
    TableChartAjax(add, type, t);
}

/*
* closeCover
* 关闭cover
* */
function closeCover() {
    $("#cover").fadeOut();
    $("#coverGant").fadeOut().removeAttr("_echarts_instance_").removeAttr("style").html("");
    $("#coverTable").fadeOut();
    $("#coverSetImport").fadeOut();
    $("#cover > .cover-small").css("display", "none");
    $(".select_time").css({
        zIndex: 6666,
        top: "9px",
        left: "20px"
    });
}

/*
* setImportVillageAjax
* 设置重点村
* */
function setImportVillageAjax(arr, callback) {
    $.ajax({
        url: "http://60.164.210.223:7577/Nvr/map/setKeyVillage",
        dataType: "text",
        contentType: "application/json",
        data: JSON.stringify(arr),
        type: 'POST',
        beforeSend: function () {
            placeholder.show(document.body);
        },
        success: function (list) {
            alert("设置重点村成功！");
            callback(list);
        },
        error: function (error) {
            alert("设置重点村请求失败！");
            placeholder.hide(document.body);
            $(".vii-holder-mask").hide();
        }
    });
}

/*
* TableChartAjax
* 表格请求
* */
function TableChartAjax(add, type, t) {
    $.ajax({
        url: (t === "jj" && type === "today") ? "http://60.164.210.223:7577/Nvr/map/getJijGjzLc" : ( (parseInt(t) > 0 && type === "all" ) ? "http://60.164.210.223:7577/Nvr/map/getGjzLcBySituation" : "http://60.164.210.223:7577/Nvr/map/getGjzLc"),
        dataType: "jsonp",
        data: {
            date: (type === "today" || add === "" ) ? $(".write_date").text() : null,
            gjzType: t,
            address: add
        },
        type: 'POST',
        beforeSend: function () {
            placeholder.show(document.body);
        },
        success: function (item) {
            roundTable = item;
            tablebuttonMsg = {
                type: type,
                t: t
            };
            var name = (t === "jj" && type === "today") ? "积极浆员" : ((t === "" && type === "today") ? "当天所有浆员" : ((t === "" && type === "all" && add !== "" ) ? "所有浆员" : ((t === "" && type === "all" && add === "") ? "今天所有村落浆员" : t)));
            initTable(add, name);
        },
        error: function (error) {
            alert("表格请求失败！");
            placeholder.hide(document.body);
            $(".vii-holder-mask").hide();
        }
    });
}

/*
* playInterval
* 定时请求
* */
function playInterval() {
    timer = setInterval(function () {
        newPulpTodayAjax();
        positivePulpTodayAjax();
        allPulpTodayAjax();
    }, 300000);
}

/*
* initMap
* 生成地图
* */
function initMap() {
    var allTodayPeople = 0, positiveTodayPeople = 0, newPeople = 0, allPeople = 0,
        mapTypePeoplezc = 0, mapTypePeoplefs = 0, mapTypePeoplenew = 0, mapTypePeoplexm = 0, mapTypePeoplels = 0,
        mapTypePeoplelj = 0, mapTypePeopleNolj = 0, mapTypePeoplejz = 0, mapTypePeopleNojz = 0,
        mapTypePeoplexmNolj = 0;
    for (var i in allToday) {
        allTodayPeople += parseInt(allToday[i].value[2]);
    }
    for (var p in positiveToday) {
        positiveTodayPeople += parseInt(positiveToday[p].value[2]);
    }
    for (var n in newToday) {
        newPeople += parseInt(newToday[n].value[2]);
    }
    for (var a in allPulps) {
        allPeople += parseInt(allPulps[a].value[2]);
    }
    for (var zc = 0; zc < mapType.gjzType1.length; zc++) {
        mapTypePeoplezc += parseInt(mapType.gjzType1[zc].value[2]);
    }
    for (var fs = 0; fs < mapType.gjzType2.length; fs++) {
        mapTypePeoplefs += parseInt(mapType.gjzType2[fs].value[2]);
    }
    for (var nw = 0; nw < mapType.gjzType3.length; nw++) {
        mapTypePeoplenew += parseInt(mapType.gjzType3[nw].value[2]);
    }
    for (var xm = 0; xm < mapType.gjzType4.length; xm++) {
        mapTypePeoplexm += parseInt(mapType.gjzType4[xm].value[2]);
    }
    for (var ls = 0; ls < mapType.gjzType5.length; ls++) {
        mapTypePeoplels += parseInt(mapType.gjzType5[ls].value[2]);
    }
    for (var lj = 0; lj < mapType.gjzType6.length; lj++) {
        mapTypePeoplelj += parseInt(mapType.gjzType6[lj].value[2]);
    }
    for (var nlj = 0; nlj < mapType.gjzType7.length; nlj++) {
        mapTypePeopleNolj += parseInt(mapType.gjzType7[nlj].value[2]);
    }
    for (var jz = 0; jz < mapType.gjzType8.length; jz++) {
        mapTypePeoplejz += parseInt(mapType.gjzType8[jz].value[2]);
    }
    for (var njz = 0; njz < mapType.gjzType9.length; njz++) {
        mapTypePeopleNojz += parseInt(mapType.gjzType9[njz].value[2]);
    }
    for (var xmnlj = 0; xmnlj < mapType.gjzType10.length; xmnlj++) {
        mapTypePeoplexmNolj += parseInt(mapType.gjzType10[xmnlj].value[2]);
    }


    myChart.on('legendselectchanged', function (params) {
        legendSelect = params.selected;
        clearInterval(timer);
        if (legendSelect.当天所有浆员) {
            playInterval();
        }
    });

    var option = {
        bmap: {
            center: [104.0605846983, 34.4484187205],
            zoom: 11,
            roam: true,
            enableMapClick: false,
            mapStyle: {
                styleJson: [
                    {
                        'featureType': 'water',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#d1d1d1'
                        }
                    }, {
                        'featureType': 'land',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#f3f3f3'
                        }
                    },
                    {
                        'featureType': 'railway',
                        'elementType': 'all',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'highway',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#fdfdfd'
                        }
                    }, {
                        'featureType': 'highway',
                        'elementType': 'labels',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'arterial',
                        'elementType': 'geometry',
                        'stylers': {
                            'color': '#fefefe'
                        }
                    }, {
                        'featureType': 'arterial',
                        'elementType': 'geometry.fill',
                        'stylers': {
                            'color': '#fefefe'
                        }
                    }, {
                        'featureType': 'poi',
                        'elementType': 'all',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'green',
                        'elementType': 'all',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'subway',
                        'elementType': 'all',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'manmade',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#d1d1d1'
                        }
                    }, {
                        'featureType': 'local',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#d1d1d1'
                        }
                    }, {
                        'featureType': 'arterial',
                        'elementType': 'labels',
                        'stylers': {
                            'visibility': 'off'
                        }
                    }, {
                        'featureType': 'boundary',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#fefefe'
                        }
                    }, {
                        'featureType': 'building',
                        'elementType': 'all',
                        'stylers': {
                            'color': '#d1d1d1'
                        }
                    }, {
                        'featureType': 'label',
                        'elementType': 'labels.text.fill',
                        'stylers': {
                            'color': '#FFF'
                        }
                    }
                ]
            }
        },
        legend: (function () {
            var legdata = [
                {
                    top: 0,
                    padding: [8, 391, 8, 8],
                    data: ["新浆员", "积极浆员", "当天所有浆员", "所有浆员"]
                },
                {
                    top: 22,
                    padding: [8, 85, 8, 8],
                    data: ["今年已进站", "今年新浆员", "复苏浆员", "忠诚浆员", "未被链接浆员"]
                },
                {
                    top: 44,
                    padding: 8,
                    data: ["今年未进站", "休眠浆员", "流失浆员", "已链接休眠的浆员", "未链接休眠的浆员"]
                },
                {
                    top: 66,
                    padding: [8, 529, 8, 8],
                    data: ["A类重点村", "B类重点村", "C类重点村"]
                }
            ], data = [];
            for (var l = 0; l < legdata.length; l++) {
                var item = legdata[l];
                data.push({
                    show: legendShow,
                    right: 0,
                    top: item.top,
                    borderRadius: [8, 0, 0, 8],
                    backgroundColor: "#06B7E5",
                    padding: item.padding,
                    textStyle: {
                        color: "#FFF",
                        fontWeight: "bold",
                        width: 30
                    },
                    itemWidth: 20,
                    itemHeight: 18,
                    itemGap: 7,
                    pageIconColor: "#FFF",
                    pageIconInactiveColor: "#FFF",
                    pageTextStyle: {
                        color: "#FFF"
                    },
                    z: 10,
                    selected: legendSelect,
                    data: item.data,
                    formatter: function (name) {
                        var importA = importVillageMap.kmA.length, importB = importVillageMap.kmB.length,
                            importC = importVillageMap.kmC.length;
                        if (name === "当天所有浆员") {
                            return name + "（" + (allTodayPeople.toString().length === 2 ? "0" + allTodayPeople.toString() : (allTodayPeople.toString().length === 1 ? "00" + allTodayPeople.toString() : allTodayPeople)) + "人）"
                        } else if (name === "新浆员") {
                            return name + "（" + (newPeople.toString().length === 2 ? "0" + newPeople.toString() : (newPeople.toString().length === 1 ? "00" + newPeople.toString() : newPeople)) + "人）"
                        } else if (name === "积极浆员") {
                            return name + "（" + (positiveTodayPeople.toString().length === 2 ? "0" + positiveTodayPeople.toString() : (positiveTodayPeople.toString().length === 1 ? "00" + positiveTodayPeople.toString() : positiveTodayPeople)) + " 人）"
                        } else if (name === "所有浆员") {
                            return name + "（" + (allPeople.toString().length === 3 ? "00" + allPeople.toString() : (allPeople.toString().length === 4 ? "0" + allPeople.toString() : (allPeople.toString().length === 2 ? "000" + allPeople.toString() : allPeople))) + " 人）"
                        } else if (name === "忠诚浆员") {
                            return "A3:" + name + "（" + (mapTypePeoplezc.toString().length === 3 ? "0" + mapTypePeoplezc.toString() : (mapTypePeoplezc.toString().length === 2 ? "00" + mapTypePeoplezc.toString() : (mapTypePeoplezc.toString().length === 1 ? "000" + mapTypePeoplezc.toString() : mapTypePeoplezc))) + " 人）"
                        } else if (name === "复苏浆员") {
                            return "A2:" + name + "（" + (mapTypePeoplefs.toString().length === 3 ? "0" + mapTypePeoplefs.toString() : (mapTypePeoplefs.toString().length === 2 ? "00" + mapTypePeoplefs.toString() : (mapTypePeoplefs.toString().length === 1 ? "000" + mapTypePeoplefs.toString() : mapTypePeoplefs))) + " 人）"
                        } else if (name === "今年新浆员") {
                            return "A1:" + name + "（" + (mapTypePeoplenew.toString().length === 3 ? "0" + mapTypePeoplenew.toString() : (mapTypePeoplenew.toString().length === 2 ? "00" + mapTypePeoplenew.toString() : (mapTypePeoplenew.toString().length === 1 ? "000" + mapTypePeoplenew.toString() : mapTypePeoplenew))) + " 人）"
                        } else if (name === "休眠浆员") {
                            return "B1:" + name + "（" + (mapTypePeoplexm.toString().length === 3 ? "0" + mapTypePeoplexm.toString() : (mapTypePeoplexm.toString().length === 2 ? "00" + mapTypePeoplexm.toString() : (mapTypePeoplexm.toString().length === 1 ? "000" + mapTypePeoplexm.toString() : mapTypePeoplexm))) + " 人）"
                        } else if (name === "流失浆员") {
                            return "B2:" + name + "（" + (mapTypePeoplels.toString().length === 3 ? "0" + mapTypePeoplels.toString() : (mapTypePeoplels.toString().length === 2 ? "00" + mapTypePeoplels.toString() : (mapTypePeoplels.toString().length === 1 ? "000" + mapTypePeoplels.toString() : mapTypePeoplels))) + " 人）"
                        } else if (name === "已链接休眠的浆员") {
                            return "B1.1:" + name + "（" + (mapTypePeoplelj.toString().length === 3 ? "0" + mapTypePeoplelj.toString() : (mapTypePeoplelj.toString().length === 2 ? "00" + mapTypePeoplelj.toString() : (mapTypePeoplelj.toString().length === 1 ? "000" + mapTypePeoplelj.toString() : mapTypePeoplelj))) + " 人）"
                        } else if (name === "未被链接浆员") {
                            return "A4:" + name + "（" + (mapTypePeopleNolj.toString().length === 3 ? "0" + mapTypePeopleNolj.toString() : (mapTypePeopleNolj.toString().length === 2 ? "00" + mapTypePeopleNolj.toString() : (mapTypePeopleNolj.toString().length === 1 ? "000" + mapTypePeopleNolj.toString() : mapTypePeopleNolj))) + " 人）"
                        } else if (name === "今年已进站") {
                            return "A:" + name + "（" + (mapTypePeoplejz.toString().length === 3 ? "0" + mapTypePeoplejz.toString() : (mapTypePeoplejz.toString().length === 2 ? "00" + mapTypePeoplejz.toString() : (mapTypePeoplejz.toString().length === 1 ? "000" + mapTypePeoplejz.toString() : mapTypePeoplejz))) + " 人）"
                        } else if (name === "今年未进站") {
                            return "B:" + name + "（" + (mapTypePeopleNojz.toString().length === 3 ? "0" + mapTypePeopleNojz.toString() : (mapTypePeopleNojz.toString().length === 2 ? "00" + mapTypePeopleNojz.toString() : (mapTypePeopleNojz.toString().length === 1 ? "000" + mapTypePeopleNojz.toString() : mapTypePeopleNojz))) + " 人）"
                        } else if (name === "未链接休眠的浆员") {
                            return "B1.2:" + name + "（" + (mapTypePeoplexmNolj.toString().length === 3 ? "0" + mapTypePeoplexmNolj.toString() : (mapTypePeoplexmNolj.toString().length === 2 ? "00" + mapTypePeoplexmNolj.toString() : (mapTypePeoplexmNolj.toString().length === 1 ? "000" + mapTypePeoplexmNolj.toString() : mapTypePeoplexmNolj))) + " 人）"
                        } else if (name === "A类重点村") {
                            return name + "（" + (importA.toString().length === 2 ? "0" + importA.toString() : (importA.toString().length === 1 ? "00" + importA.toString() : importA)) + " 村）"
                        } else if (name === "B类重点村") {
                            return name + "（" + (importB.toString().length === 2 ? "0" + importB.toString() : (importB.toString().length === 1 ? "00" + importB.toString() : importB)) + " 村）"
                        } else if (name === "C类重点村") {
                            return name + "（" + (importC.toString().length === 2 ? "0" + importC.toString() : (importC.toString().length === 1 ? "00" + importC.toString() : importC)) + " 村）"
                        } else {
                            return name;
                        }
                    }
                })
            }
            return data;
        }()),
        tooltip: {
            padding: 10,
            backgroundColor: "#F6F6F6",
            borderWidth: 1,
            borderColor: "rgba(0,0,0,.3)",
            confine: true,
            enterable: true,
            transitionDuration: 0,
            textStyle: {
                color: "#333"
            },
            extraCssText: 'box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.3);',
            position: function (pos, params, dom, rect, size) {
                return [pos[0], pos[1]];
            },
            formatter: function (params) {
                var html;
                minuteTopTable = params.data.villageColligate;

                if (params.seriesIndex > 3 && params.seriesIndex < 18) {
                    var villageColligate = params.data.villageColligate;
                    var tableHtml = '<table id="tooltipTable" cellpadding="0" cellspacing="0" style="width:600px;height: 240px;table-layout:fixed;">' +
                        '<thead>' +
                        '<tr>' +
                        '<th style="width:5%;text-align:center;">编号</th>' +
                        '<th style="width:45%;text-align:center;">浆员类型</th>' +
                        '<th style="width:12%;text-align:center;">人数</th>' +
                        '<th style="width:12%;text-align:center;">同期浆量</th>' +
                        '<th style="width:12%;text-align:center;">当期浆量</th>' +
                        '<th style="width:14%;text-align:center;">去年全年浆量</th>' +
                        '</tr>' +
                        '</thead>' +
                        '<tbody>' +
                        '<tr>' +
                        '<td style="width:5%;"><a href="javascript:void(0);" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\' ,\'' + ("8") + '\')">A</a></td>' +
                        '<td style="width:45%;">今年已进站浆员</td>' +
                        '<td style="width:12%;">' + villageColligate.currentTimePNum + '</td>' +
                        '<td style="width:12%;">' + villageColligate.lastTimeCollNum + '</td>' +
                        '<td style="width:12%;">' + villageColligate.currentTimeCollNum + '</td>' +
                        '<td style="width:14%;">' + villageColligate.lastYearCollNum + '</td>' +
                        '</tr>' +
                        '<tr>' +
                        '<td style="width:5%;"><a href="javascript:void(0);" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\' ,\'' + ("3") + '\')">A1</a></td>' +
                        '<td style="width:45%;">今年新增浆员</td>' +
                        '<td style="width:12%;">' + villageColligate.currentTimeAddPNum + '</td>' +
                        '<td style="width:12%;">' + villageColligate.lastTimeAddCollNum + '</td>' +
                        '<td style="width:12%;">' + villageColligate.currentTimeAddCollNum + '</td>' +
                        '<td style="width:14%;"></td>' +
                        '</tr>' +
                        '<tr>' +
                        '<td style="width:5%;"><a href="javascript:void(0);" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\' ,\'' + ("2") + '\')">A2</a></td>' +
                        '<td style="width:45%;">今年复苏浆员（去年没来，今年来）</td>' +
                        '<td style="width:12%;">' + villageColligate.currentTimeFuSuPNum + '</td>' +
                        '<td style="width:12%;"></td>' +
                        '<td style="width:12%;">' + villageColligate.currentTimeFuSuCollNum + '</td>' +
                        '<td style="width:14%;"></td>' +
                        '</tr>' +
                        '<tr>' +
                        '<td style="width:5%;"><a href="javascript:void(0);" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\' ,\'' + ("1") + '\')">A3</a></td>' +
                        '<td style="width:45%;">忠诚浆员（去年今年都来过）</td>' +
                        '<td style="width:12%;">' + villageColligate.currentTimeZCPNum + '</td>' +
                        '<td style="width:12%;">' + villageColligate.lastTimeZCCollNum + '</td>' +
                        '<td style="width:12%;">' + villageColligate.currentTimeZCCollNum + '</td>' +
                        '<td style="width:14%;">' + villageColligate.lastYearZCCollNum + '</td>' +
                        '</tr>' +
                        '<tr>' +
                        '<td style="width:5%"><a href="javascript:void(0);" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\' ,\'' + ("7") + '\')">A4</a></td>' +
                        '<td style="width:45%">进站未被链接浆员</td>' +
                        '<td style="width:12%">' + villageColligate.comedNotConnPNum + '</td>' +
                        '<td style="width:12%">' + villageColligate.comedNotConnLastTimeCollNum + '</td>' +
                        '<td style="width:12%">' + villageColligate.comedNotConnThisTimeCollNum + '</td>' +
                        '<td style="width:14%">' + villageColligate.comedNotConnLastYearCollNum + '</td>' +
                        '</tr>' +
                        '<tr>' +
                        '<td style="width:5%"><a href="javascript:void(0);" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\' ,\'' + ("9") + '\')">B</a></td>' +
                        '<td style="width:45%">今年未进站浆员</td>' +
                        '<td style="width:12%">' + villageColligate.currentTimeNotComedPNum + '</td>' +
                        '<td style="width:12%"></td>' +
                        '<td style="width:12%"></td>' +
                        '<td style="width:14%">' + villageColligate.currentTimeNotComedPLastYearCollNum + '</td>' +
                        '</tr>' +
                        '<tr>' +
                        '<td style="width:5%"><a href="javascript:void(0);" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\' ,\'' + ("4") + '\')">B1</a></td>' +
                        '<td style="width:45%">休眠浆员（去年来，今年没来）</td>' +
                        '<td style="width:12%">' + villageColligate.xiuMianPNum + '</td>' +
                        '<td style="width:12%">' + villageColligate.lastTimeXiuMianCollNum + '</td>' +
                        '<td style="width:12%"></td>' +
                        '<td style="width:14%">' + villageColligate.lastYearXiuMianCollNum + '</td>' +
                        '</tr>' +
                        '<tr>' +
                        '<td style="width:5%"><a href="javascript:void(0);" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\' ,\'' + ("5") + '\')">B2</a></td>' +
                        '<td style="width:45%">流失浆员（去年、今年都没来）</td>' +
                        '<td style="width:12%">' + villageColligate.liuShiPNum + '</td>' +
                        '<td style="width:12%"></td>' +
                        '<td style="width:12%"></td>' +
                        '<td style="width:14%"></td>' +
                        '</tr>' +
                        '<tr>' +
                        '<td style="width:5%"><a href="javascript:void(0);" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\' ,\'' + ("6") + '\')">B1.1</a></td>' +
                        '<td style="width:45%">已链接休眠的浆员</td>' +
                        '<td style="width:12%">' + villageColligate.connXMPNum + '</td>' +
                        '<td style="width:12%">' + villageColligate.lastTimeConnXMCollNum + '</td>' +
                        '<td style="width:12%"></td>' +
                        '<td style="width:14%"></td>' +
                        '</tr>' +
                        '<tr>' +
                        '<td style="width:5%"><a href="javascript:void(0);" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\' ,\'' + ("10") + '\')">B1.2</a></td>' +
                        '<td style="width:45%">未链接休眠的浆员</td>' +
                        '<td style="width:12%">' + villageColligate.notConnXMPNum + '</td>' +
                        '<td style="width:12%">' + villageColligate.lastTimeNotConnXMCollNum + '</td>' +
                        '<td style="width:12%"></td>' +
                        '<td style="width:14%"></td>' +
                        '</tr>' +
                        '</tbody>' +
                        '</table>';
                }
                switch (params.seriesIndex) {
                    case 0:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '当天人数：' + (allTodayPeople + newPeople) + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + "" + '\',\'' + ("all") + '\',\'' + ("") + '\' )">今天所有村落浆员统计轮次表</p>';
                        return html;
                        break;
                    case 1:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverGant( \'' + params.name + '\' , \'' + ("new") + '\')" >今天新浆员统计甘特图</p>';
                        return html;
                        break;
                    case 2:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverGant( \'' + params.name + '\',\'' + ("jj") + '\' )" >今天积极浆员统计甘特图</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("today") + '\',\'' + ("jj") + '\')">今天积极浆员统计轮次表</p>';
                        return html;
                        break;
                    case 3:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverGant( \'' + params.name + '\',\'' + ("old") + '\' )" >今天所有浆员统计甘特图</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("today") + '\',\'' + ("") + '\')">今天所有浆员统计轮次表</p>';
                        return html;
                        break;
                    case 4:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor" onclick="OpenCoverTable( \'' + params.name + '\' , \'' + ("all") + '\',\'' + ("") + '\')" >所有浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 5:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("1") + '\' )">忠诚浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 6:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("2") + '\' )">复苏浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 7:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("3") + '\' )">今年新浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 8:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("4") + '\' )">休眠浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 9:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("5") + '\' )">流失浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 10:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor" style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("6") + '\' )">已链接休眠的浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 11:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("7") + '\' )">未链接浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 12:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor"  style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("8") + '\' )">今年已进站浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 13:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor" style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("9") + '\' )">今年未进站浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 14:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor" style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("10") + '\' )">未链接休眠的浆员统计轮次表</p>';
                        return html + tableHtml;
                        break;
                    case 15:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor" style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("0A") + '\' )">A类重点村浆员统计轮次表</p>';
                        return html;
                        break;
                    case 16:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor" style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("0B") + '\' )">B类重点村浆员统计轮次表</p>';
                        return html;
                        break;
                    case 17:
                        html = '<p style="font-weight: bold; font-size: 1.5rem;margin-bottom: 0;">' + params.name + '：' + params.value[2] + '人</p>' +
                            '<p class="cursor" style="margin-bottom: 0;" onclick="OpenCoverTable(\'' + params.name + '\',\'' + ("all") + '\',\'' + ("0C") + '\' )">C类重点村浆员统计轮次表</p>';
                        return html;
                        break;
                }
            }
        },
        toolbox: {
            itemSize: 22,
            iconStyle: {
                color: "#fff",
                textAlign: "left"
            },
            z: 11,
            feature: {
                myTool1: {
                    show: true,
                    title: '设置重点村',
                    icon: 'image://images/' + (legendShow ? "setting" : "setting1") + '.png',
                    label: {
                        color: '#fff'
                    },
                    onclick: function () {
                        OpenCoverSetImport();
                    }
                },
                myTool2: {
                    show: true,
                    title: '标题显示隐藏',
                    icon: 'image://images/' + (legendShow ? "hide" : "show") + '.png',
                    label: {
                        color: '#fff'
                    },
                    onclick: function () {
                        legendShow = legendShow ? false : true;
                        initMap();
                    }
                }
            }
        },
        series: (function () {
            var series = [];
            var datas = [
                {
                    name: "岷县采浆站",
                    data: [{name: '岷县采浆站', value: [104.0605846983, 34.4484187205]}],
                    symbol: 'path://M512.0266 906.0321c0 0-423.7476-234.24-423.552-522.368 0.128-188.032 194.816-210.432 194.816-210.432 31.616 0.896 135.168 6.144 229.035 125.696 0 0 74.069-123.6572 210.261-125.7001s209.3507 118.698 209.92 208.9001C933.2746 503.8561 824.9866 750.7681 512.0266 906.0321z',
                    symbolSize: 35,
                    shadowColor: "rgba(140,40,73,.5)",
                    z: 0,
                    color: '#FF2987'
                },
                {
                    name: "新浆员",
                    data: newToday,
                    symbol: 'path://M669.165373 714.428272c111.777561-57.260787 188.614011-173.364263 188.614012-307.295631 0-190.438575-154.985522-345.347305-345.511127-345.347305S166.757131 216.693042 166.757131 407.132641c0 135.805078 79.057258 253.223223 193.403747 309.603469-67.787352 53.232822-109.285424 138.674005-109.440031 229.832562a15.665445 15.665445 0 0 0 4.558338 11.068201 15.645992 15.645992 0 0 0 11.067176 4.577791h499.675493c4.153903 0 8.122482-1.650503 11.058985-4.577791a15.668517 15.668517 0 0 0 4.558337-11.068201c-0.155631-92.781416-42.821956-179.091878-112.473803-232.1404z m-60.909914-461.548051l4.885981 113.255028 50.123282-113.255028h39.586479l8.595517 115.176861 45.623306-115.176861h33.511767l-69.120451 164.894684h-35.3179l-11.106084-123.270673-54.468652 123.270673H584.467532l-10.27469-164.894684h34.062617z m-171.741405 0h122.246789l-4.906459 27.891661h-88.965396l-6.442286 36.544515h82.776009l-4.906458 27.794391h-82.785224l-7.909515 44.869726h92.125106l-4.906458 27.794391H407.443902l29.070152-164.894684z m-145.183867 57.367271l-18.976691 107.528437h-30.924408l29.088582-164.894684h32.382421l48.056058 110.126034 19.431296-110.126034h30.914169l-29.070152 164.894684h-33.396068l-47.505207-107.528437z m221.304622 283.740125c-59.364871 0-114.790855-26.480746-152.126834-72.664117-5.418401-6.6829-10.874686-18.600925 0.08703-29.571856 10.304382-12.864095 25.824436-9.136129 31.261267-2.433776 31.349321 38.814469 70.906107 57.994913 120.778537 57.994913 50.161166 0 86.619675-17.354856 118.016094-56.565569 6.992113-9.927592 16.640184-12.515974 31.696418-1.487705 13.945318 10.855232 12.01427 21.169853 3.02251 31.310413-37.364647 46.647192-93.021006 73.417697-152.735022 73.417697z',
                    symbolSize: function (val) {
                        return ( 11 + parseInt(val[2])).toString();
                    },
                    shadowColor: "rgba(159,0,0,.5)",
                    z: 1,
                    color: '#FF0020'
                },
                {
                    name: "积极浆员",
                    data: positiveToday,
                    symbol: 'path://M432.3328 0c58.9824 0 114.5856 2.1504 166.912 6.3488 52.224 4.1984 98.6112 13.9264 139.0592 29.0816 38.8096 15.1552 69.5296 37.0688 92.2624 65.7408 22.7328 28.672 34.0992 66.6624 34.0992 113.7664l0 513.2288c0 25.2928-5.0176 49.2544-15.1552 72.0896-10.1376 22.7328-23.6544 42.5984-40.448 59.392C790.528 876.544 769.8432 889.9584 747.1104 900.096 724.3776 910.2336 700.416 915.2512 675.1232 915.2512l80.896 80.896L756.0192 1024 108.7488 1024 108.7488 996.1472l80.896-80.896c-25.2928 0-49.2544-5.0176-72.0896-15.1552C94.8224 889.9584 74.1376 876.544 55.6032 859.648c-16.896-16.7936-30.3104-36.6592-40.448-59.392C5.0176 777.5232 0 753.4592 0 728.1664L0 214.9376c0-47.104 11.3664-85.0944 34.0992-113.7664 22.7328-28.672 53.5552-50.5856 92.2624-65.7408C166.912 20.2752 213.1968 10.5472 265.5232 6.3488 317.7472 2.1504 373.3504 0 432.3328 0zM379.2896 214.9376 108.7488 214.9376l0 270.5408 270.5408 0L379.2896 214.9376zM189.6448 809.0624c10.1376 0 20.2752-2.56 30.3104-7.5776C230.0928 796.4672 238.4896 790.528 245.248 783.7696 253.6448 777.1136 259.9936 768.6144 264.192 758.4768 268.3904 748.4416 270.5408 738.304 270.5408 728.1664c0-11.776-2.1504-22.3232-6.3488-31.6416-4.1984-9.216-10.5472-18.0224-18.944-26.5216-6.7584-6.656-15.1552-12.1856-25.2928-16.384C209.8176 649.4208 199.7824 647.2704 189.6448 647.2704c-10.1376 0-20.2752 2.1504-30.3104 6.3488-10.1376 4.1984-18.5344 9.728-25.2928 16.384C125.5424 678.5024 119.296 687.3088 114.9952 696.5248c-4.1984 9.216-6.3488 19.8656-6.3488 31.6416 0 10.1376 2.1504 20.2752 6.3488 30.3104 4.1984 10.1376 10.5472 18.6368 18.944 25.2928C140.6976 790.528 149.1968 796.4672 159.232 801.4848 169.3696 806.5024 179.5072 809.0624 189.6448 809.0624zM756.0192 214.9376 485.4784 214.9376l0 270.5408 270.5408 0L756.0192 214.9376zM675.1232 809.0624c10.1376 0 20.2752-2.56 30.3104-7.5776C715.5712 796.4672 723.968 790.528 730.7264 783.7696 739.1232 777.1136 745.472 768.6144 749.6704 758.4768 753.8688 748.4416 756.0192 738.304 756.0192 728.1664c0-11.776-2.1504-22.3232-6.3488-31.6416C745.472 687.3088 739.1232 678.5024 730.7264 670.0032 723.968 663.3472 715.5712 657.8176 705.4336 653.6192 695.296 649.4208 685.1584 647.2704 675.1232 647.2704c-10.1376 0-20.2752 2.1504-30.3104 6.3488-10.1376 4.1984-18.5344 9.728-25.2928 16.384C611.0208 678.5024 604.672 687.3088 600.4736 696.5248c-4.1984 9.216-6.3488 19.8656-6.3488 31.6416 0 10.1376 2.1504 20.2752 6.3488 30.3104 4.1984 10.1376 10.5472 18.6368 18.944 25.2928C626.176 790.528 634.6752 796.4672 644.7104 801.4848 654.848 806.5024 664.9856 809.0624 675.1232 809.0624z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) < 10) {
                            return ( 11 + parseInt(val[2])).toString();
                        } else {
                            return ( 8 + parseInt(val[2])).toString();
                        }

                    },
                    shadowColor: "rgba(19,72,145,.5)",
                    z: 1,
                    color: '#2E4ECC'
                },
                {
                    name: "当天所有浆员",
                    data: allToday,
                    symbol: 'path://M512 959.469288c-10.69969 0-16.60519-1.283226-20.36584-5.689582-2.261507-2.64934-229.644237-272.535093-290.237267-403.232784-21.890566-46.818305-33.44267-97.655134-33.44267-147.265018 0-187.090049 154.331971-339.226005 344.045777-339.226005s344.045777 153.187915 344.045777 341.429183c0 56.871265-10.660804 99.841939-36.789904 148.300604C747.006362 687.675068 534.795169 950.618713 532.675902 953.24247c-2.532683 3.166109-7.055696 6.227842-20.145829 6.227842L512 959.470311zM512 272.403087c-72.959685 0-132.325771 59.365062-132.325771 132.325771S439.040315 537.054629 512 537.054629s132.325771-59.365062 132.325771-132.325771S584.959685 272.403087 512 272.403087z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) < 15) {
                            return ( 13 + parseInt(val[2])).toString();
                        } else {
                            return ( 9 + parseInt(val[2])).toString();
                        }
                    },
                    shadowColor: "rgba(10,148,2,.5)",
                    z: 1,
                    color: '#52BF4C'
                },
                {
                    name: "所有浆员",
                    data: allPulps,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }

                    },
                    shadowColor: "rgba(130,79,0,.5)",
                    z: 1,
                    color: '#FFA000'
                },
                {
                    name: "忠诚浆员",
                    data: mapType.gjzType1,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }
                    },
                    shadowColor: "rgba(7,141,21,.5)",
                    z: 3,
                    color: '#52BF4C'
                },
                {
                    name: "复苏浆员",
                    data: mapType.gjzType2,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }
                    },
                    shadowColor: "rgba(7,141,21,.5)",
                    z: 3,
                    color: '#52BF4C'
                },
                {
                    name: "今年新浆员",
                    data: mapType.gjzType3,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }
                    },
                    shadowColor: "rgba(7,141,21,.5)",
                    z: 3,
                    color: '#52BF4C'
                },
                {
                    name: "休眠浆员",
                    data: mapType.gjzType4,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }
                    },
                    shadowColor: "rgba(7,141,21,.5)",
                    z: 3,
                    color: '#52BF4C'
                },
                {
                    name: "流失浆员",
                    data: mapType.gjzType5,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }
                    },
                    shadowColor: "rgba(7,141,21,.5)",
                    z: 3,
                    color: '#52BF4C'
                },
                {
                    name: "已链接休眠的浆员",
                    data: mapType.gjzType6,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }
                    },
                    shadowColor: "rgba(0,71,142,.5)",
                    z: 4,
                    color: '#FF0020'
                },
                {
                    name: "未被链接浆员",
                    data: mapType.gjzType7,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }
                    },
                    shadowColor: "rgba(7,141,21,.5)",
                    z: 3,
                    color: '#52BF4C'
                },
                {
                    name: "今年已进站",
                    data: mapType.gjzType8,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }
                    },
                    shadowColor: "rgba(75,3,141,.5)",
                    z: 2,
                    color: '#FF0020'
                },
                {
                    name: "今年未进站",
                    data: mapType.gjzType9,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }
                    },
                    shadowColor: "rgba(75,3,141,.5)",
                    z: 2,
                    color: '#00C2C0'
                },
                {
                    name: "未链接休眠的浆员",
                    data: mapType.gjzType10,
                    symbol: 'path://M781.186088 616.031873q17.338645 80.573705 30.59761 145.848606 6.119522 27.537849 11.219124 55.075697t9.689243 49.976096 7.649402 38.247012 4.079681 19.888446q3.059761 20.398406-9.179283 27.027888t-27.537849 6.629482q-5.099602 0-14.788845-3.569721t-14.788845-5.609562l-266.199203-155.027888q-72.414343 42.836653-131.569721 76.494024-25.498008 14.278884-50.486056 28.557769t-45.386454 26.517928-35.187251 20.398406-19.888446 10.199203q-10.199203 5.099602-20.908367 3.569721t-19.378486-7.649402-12.749004-14.788845-2.039841-17.848606q1.01992-4.079681 5.099602-19.888446t9.179283-37.737052 11.729084-48.446215 13.768924-54.055777q15.298805-63.23506 34.677291-142.788845-60.175299-52.015936-108.111554-92.812749-20.398406-17.338645-40.286853-34.167331t-35.697211-30.59761-26.007968-22.438247-11.219124-9.689243q-12.239044-11.219124-20.908367-24.988048t-6.629482-28.047809 11.219124-22.438247 20.398406-10.199203l315.155378-28.557769 117.290837-273.338645q6.119522-16.318725 17.338645-28.047809t30.59761-11.729084q10.199203 0 17.848606 4.589641t12.749004 10.709163 8.669323 12.239044 5.609562 10.199203l114.231076 273.338645 315.155378 29.577689q20.398406 5.099602 28.557769 12.239044t8.159363 22.438247q0 14.278884-8.669323 24.988048t-21.928287 26.007968z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 8 + parseInt(val[2]) / 5).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 8 + parseInt(val[2]) / 9).toString();
                        } else {
                            return ( 8 + parseInt(val[2]) / 13).toString();
                        }
                    },
                    shadowColor: "rgba(0,71,142,.5)",
                    z: 4,
                    color: '#FF0020'
                },
                {
                    name: "A类重点村",
                    data: importVillageMap.kmA,
                    symbol: 'path://M835.998697 63.542198a10.012028 10.012028 0 0 0-10.32209 0.599658c-1.040702 0.713244-104.847953 71.332628-173.440167 71.338768-4.019547 0-7.872295-0.251733-11.452843-0.74906-27.684526-3.845585-49.52802-13.289678-72.655764-23.287379-33.070186-14.297634-67.267033-29.081339-120.950699-29.081339-4.019547 0-8.15268 0.084934-12.286838 0.254803-84.232426 3.438309-157.249417 25.406646-178.760336 32.45825l-11.997242-12.938684a10.004865 10.004865 0 0 0-11.17041-2.438539l-44.13008 18.302855a10.004865 10.004865 0 0 0-5.856382 11.736299l212.212216 824.361147a10.001795 10.001795 0 0 0 9.688664 7.510044 10.007935 10.007935 0 0 0 7.002484-2.858094l51.025117-49.985438a10.001795 10.001795 0 0 0 2.784416-9.230222c-0.450255-2.118244-45.097104-212.319663-47.820122-259.618922-1.444908-25.099654 8.497535-50.903344 27.27725-70.79744 20.288069-21.490453 61.013609-47.106878 139.818419-47.109947 44.490284-0.001023 85.502349-5.78782 121.895211-17.199731 29.339212-9.199523 55.767118-22.054295 78.550007-38.20923 39.289841-27.858488 54.18611-55.920614 54.801117-57.101509a9.997702 9.997702 0 0 0 1.131777-4.621251V72.393797a10.009981 10.009981 0 0 0-5.343705-8.851599z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 10 + parseInt(val[2]) / 8).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 10 + parseInt(val[2]) / 16).toString();
                        } else {
                            return ( 10 + parseInt(val[2]) / 20).toString();
                        }
                    },
                    shadowColor: "rgba(0,71,142,.5)",
                    z: 1,
                    color: '#FF0020'
                },
                {
                    name: "B类重点村",
                    data: importVillageMap.kmB,
                    symbol: 'path://M835.998697 63.542198a10.012028 10.012028 0 0 0-10.32209 0.599658c-1.040702 0.713244-104.847953 71.332628-173.440167 71.338768-4.019547 0-7.872295-0.251733-11.452843-0.74906-27.684526-3.845585-49.52802-13.289678-72.655764-23.287379-33.070186-14.297634-67.267033-29.081339-120.950699-29.081339-4.019547 0-8.15268 0.084934-12.286838 0.254803-84.232426 3.438309-157.249417 25.406646-178.760336 32.45825l-11.997242-12.938684a10.004865 10.004865 0 0 0-11.17041-2.438539l-44.13008 18.302855a10.004865 10.004865 0 0 0-5.856382 11.736299l212.212216 824.361147a10.001795 10.001795 0 0 0 9.688664 7.510044 10.007935 10.007935 0 0 0 7.002484-2.858094l51.025117-49.985438a10.001795 10.001795 0 0 0 2.784416-9.230222c-0.450255-2.118244-45.097104-212.319663-47.820122-259.618922-1.444908-25.099654 8.497535-50.903344 27.27725-70.79744 20.288069-21.490453 61.013609-47.106878 139.818419-47.109947 44.490284-0.001023 85.502349-5.78782 121.895211-17.199731 29.339212-9.199523 55.767118-22.054295 78.550007-38.20923 39.289841-27.858488 54.18611-55.920614 54.801117-57.101509a9.997702 9.997702 0 0 0 1.131777-4.621251V72.393797a10.009981 10.009981 0 0 0-5.343705-8.851599z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 10 + parseInt(val[2]) / 8).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 10 + parseInt(val[2]) / 16).toString();
                        } else {
                            return ( 10 + parseInt(val[2]) / 20).toString();
                        }
                    },
                    shadowColor: "rgba(0,71,142,.5)",
                    z: 1,
                    color: '#ffbf00'
                },
                {
                    name: "C类重点村",
                    data: importVillageMap.kmC,
                    symbol: 'path://M835.998697 63.542198a10.012028 10.012028 0 0 0-10.32209 0.599658c-1.040702 0.713244-104.847953 71.332628-173.440167 71.338768-4.019547 0-7.872295-0.251733-11.452843-0.74906-27.684526-3.845585-49.52802-13.289678-72.655764-23.287379-33.070186-14.297634-67.267033-29.081339-120.950699-29.081339-4.019547 0-8.15268 0.084934-12.286838 0.254803-84.232426 3.438309-157.249417 25.406646-178.760336 32.45825l-11.997242-12.938684a10.004865 10.004865 0 0 0-11.17041-2.438539l-44.13008 18.302855a10.004865 10.004865 0 0 0-5.856382 11.736299l212.212216 824.361147a10.001795 10.001795 0 0 0 9.688664 7.510044 10.007935 10.007935 0 0 0 7.002484-2.858094l51.025117-49.985438a10.001795 10.001795 0 0 0 2.784416-9.230222c-0.450255-2.118244-45.097104-212.319663-47.820122-259.618922-1.444908-25.099654 8.497535-50.903344 27.27725-70.79744 20.288069-21.490453 61.013609-47.106878 139.818419-47.109947 44.490284-0.001023 85.502349-5.78782 121.895211-17.199731 29.339212-9.199523 55.767118-22.054295 78.550007-38.20923 39.289841-27.858488 54.18611-55.920614 54.801117-57.101509a9.997702 9.997702 0 0 0 1.131777-4.621251V72.393797a10.009981 10.009981 0 0 0-5.343705-8.851599z',
                    symbolSize: function (val) {
                        if (parseInt(val[2]) <= 50) {
                            return ( 10 + parseInt(val[2]) / 8).toString();
                        } else if (parseInt(val) > 50 && parseInt(val) <= 100) {
                            return ( 10 + parseInt(val[2]) / 16).toString();
                        } else {
                            return ( 10 + parseInt(val[2]) / 20).toString();
                        }
                    },
                    shadowColor: "rgba(0,71,142,.5)",
                    z: 1,
                    color: '#5cf253'
                }
            ];

            // pushi scatter
            for (var d = 0; d < datas.length; d++) {
                var item = datas[d];
                series.push({
                    name: item.name,
                    type: 'scatter',
                    coordinateSystem: 'bmap',
                    data: item.data,
                    z: item.z,
                    symbolSize: item.symbolSize,
                    symbol: item.symbol,
                    itemStyle: {
                        normal: {
                            color: item.color
                        }
                    }
                })
            }


            //push line
            series.push({
                type: 'lines',
                coordinateSystem: 'bmap',
                data: county,
                polyline: true,
                lineStyle: {
                    normal: {
                        color: '#e05074',
                        opacity: 1,
                        width: 1
                    }
                }
            });
            return series;
        }())

    };
    myChart.clear();
    myChart.setOption(option, true);
    placeholder.hide(document.body);
    $(".vii-holder-mask").hide();
}


/*
* initGantt
* 生成甘特图
* */
function initGantt(add, name, gunter) {

    // if (gunter.length === 0) {
    //     closeCover();
    // } else {
    var myChartGant = echarts.init(document.getElementById("coverGant"));
    //判断是否展示上一天，下一天按钮
    // if (!($("#coverGant").is(":hidden"))) {
    //     $(".select_time").css({
    //         zIndex: 999999999999,
    //         top: "20px",
    //         left: "500px"
    //     });
    // }
    // gunterTypeData = {
    //     add: add,
    //     name:name === "新浆员" ? "new" : (name === "积极浆员" ? "jj" : "old")
    // };
    var series = [], yAxis = [], legend = [], names = ["已采完", "未采完"];
    for (var n = 0; n < names.length; n++) {
        legend.push({
            name: names[n],
            icon: "circle"
        })
    }
    for (var i in gunter) {
        var item = gunter[i];
        series.push({
            name: item.isEnd === "1" ? "已采完" : "未采完",
            value: [
                item.name,
                item.starttime,
                item.endtime,
                item.betweenminutes,
                item.cardid,
                item.id,
                item.gender,
                item.age,
                item.smallno,
                item.sfz
            ]
        });
        yAxis.push(item.name);
    }
    var option = {
        color: [
            '#e95e48',
            '#DC951F',
            '#DDB100',
            '#DAD503',
            '#8AC867',
            '#37B8D4',
            '#7BCFE7',
            '#6A9BD3'
        ],
        title: {
            text: name + "：" + add + " ( " + gunter.length + " 人 )",
            textStyle: {
                color: '#C8E1FD',
                fontFamily: '微软雅黑'
            }
        },
        legend: {
            left: "center",
            textStyle: {
                color: "#FFF"
            },
            data: legend
        },
        dataZoom: [
            {
                type: 'slider',
                filterMode: 'weakFilter',
                showDataShadow: true,
                bottom: 10,
                height: 5,
                borderColor: 'transparent',
                backgroundColor: '#e2e2e2',
                handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z',
                handleSize: 20,
                handleStyle: {
                    shadowBlur: 6,
                    shadowOffsetX: 1,
                    shadowOffsetY: 2,
                    shadowColor: '#aaa'
                },
                labelFormatter: ''
            },
            {
                type: 'inside',
                filterMode: 'weakFilter'
            }
        ],
        grid: {
            left: 100,
            right: 40
        },
        xAxis: {
            type: 'time',
            splitNumber: 30,
            splitLine: {
                show: false
            },
            axisLine: {
                lineStyle: {
                    color: "#F9F9F9"
                }
            }
        },
        yAxis: {
            axisLine: {
                lineStyle: {
                    color: "#F9F9F9"
                }
            },
            data: yAxis
        },
        tooltip: {
            padding: [5, 10],
            formatter: function (params) {
                var html;
                html = '<div>' +
                    '<p>姓名： ' + params.data.value[0] + '</p>' +
                    '<p>年龄： ' + params.data.value[7] + '</p>' +
                    '<p>性别： ' + params.data.value[6] + '</p>' +
                    '<p>卡号： ' + params.data.value[4] + '</p>' +
                    '<p>开始时间： ' + params.data.value[1] + '</p>' +
                    '<p>结束时间： ' + params.data.value[2] + '</p>' +
                    '<p>总耗时： ' + params.data.value[3] + '分钟</p>' +
                    '</div>';
                return html;
            }
        },
        series: (function () {
            var server = [];
            for (var k = 0; k < series.length; k++) {
                var item = series[k];
                server.push({
                    name: item.name,
                    type: 'custom',
                    encode: {x: [1, 2], y: 0},
                    renderItem: function (params, api) {
                        var categoryIndex = api.value(0);
                        var start = api.coord([api.value(1), categoryIndex]);
                        var end = api.coord([api.value(2), categoryIndex]);
                        return {
                            type: 'rect',
                            shape: echarts.graphic.clipRectByRect(
                                {
                                    x: start[0],
                                    y: start[1] - 2,
                                    width: end[0] - start[0],
                                    height: 10
                                },
                                {
                                    x: params.coordSys.x,
                                    y: params.coordSys.y,
                                    width: params.coordSys.width,
                                    height: params.coordSys.height
                                }
                            ),
                            style: api.style()
                        };
                    },
                    itemStyle: {
                        normal: {
                            opacity: 0.8,
                            color: item.name === "已采完" ? "#EF594F" : "#DE923C"
                        }
                    },
                    data: [
                        {
                            name: item.name,
                            value: item.value
                        }
                    ]
                })
            }
            return server;
        }())
    };
    myChartGant.clear();
    myChartGant.setOption(option);
    // }
}

/*
* initTable
* 生成轮次表
* */
function initTable(add, name) {
    var bodyclientH = document.body.clientHeight;
    var ns;
    //判断取top的数据，取name
    if (name === "0A") {
        ns = "A类重点村";
    } else if (name === "0B") {
        ns = "B类重点村";
    } else if (name === "0C") {
        ns = "C类重点村";
    } else if (name === "1") {
        ns = "忠诚浆员";
    } else if (name === "2") {
        ns = "复苏浆员";
    } else if (name === "3") {
        ns = "今年新浆员";
    } else if (name === "4") {
        ns = "休眠浆员";
    } else if (name === "5") {
        ns = "流失浆员";
    } else if (name === "6") {
        ns = "已链接休眠的浆员";
    } else if (name === "7") {
        ns = "未被链接浆员";
    } else if (name === "8") {
        ns = "今年已进站";
    } else if (name === "9") {
        ns = "今年未进站";
    } else if (name === "10") {
        ns = "未链接休眠的浆员";
    } else {
        ns = name;
    }

    //判断显示下拉框
    $("#coverTableSelect").css("display", (name === "今天所有村落浆员" || name === "积极浆员" || name === "当天所有浆员") ? "none" : "block");
    $("#coverTableSelect").val(parseInt(name) > 0 ? name : "0");

    //判断是否展示上一天，下一天按钮
    if (!($("#coverTable").is(":hidden")) && name === "今天所有村落浆员") {
        $(".select_time").css({
            zIndex: 999999999999,
            top: "20px",
            left: "400px"
        });
    }

    //展示类名和村名
    $("#coverTable>h1").text(ns + "：" + add + "（" + roundTable.length + " 人 ）");
    //top table
    var topTableList = (name === "今天所有村落浆员") ? allPulpTodayVillage : [minuteTopTable];

    $("#thisTown").bootstrapTable('destroy').bootstrapTable({
        cache: false,
        data: topTableList,
        height: (name === "今天所有村落浆员") ? ((bodyclientH - 70 - $("#coverTable>h1").height()) / 2) : "",
        undefinedText: "",
        columns: [
            {
                width: name === "今天所有村落浆员" ? "2.3%" : "",
                class: name === "今天所有村落浆员" ? "bg_f9c c_000" : "",
                title: name === "今天所有村落浆员" ? '序号' : "",
                field: "",
                sortable: name === "今天所有村落浆员" ? true : false,
                formatter: function (value, row, index) {
                    return name === "今天所有村落浆员" ? index+1 : "";
                }
            },
            {
                width: name === "今天所有村落浆员" ? "8%" : "",
                class: name === "今天所有村落浆员" ? "bg_f9c c_000" : "",
                title: name === "今天所有村落浆员" ? '村名' : "",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: name === "今天所有村落浆员" ? "villageName" : "",
                formatter: function (value, row, index) {
                    return name === "今天所有村落浆员" ? value.substr(3) : "";
                }
            },
            {
                field: "",
                title: '重点管理村',
                class: "bg_f9c c_000",
                sortable: name === "今天所有村落浆员" ? true : false,
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                formatter: function (value, row, index) {
                    return row.keyManageA ? "A" : (row.keyManageB ? "B" : (row.keyManageC ? "C" : ""));
                }
            },
            {
                field: 'allProviderNum',
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                class: "c_000 bg_f3d",
                sortable: name === "今天所有村落浆员" ? true : false,
                title: '注册浆员总人数',
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                field: 'lastYearCollNum',
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                class: "c_000 bg_f3d",
                sortable: name === "今天所有村落浆员" ? true : false,
                title: '去年浆量/袋',
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                field: 'currentTimePNum',
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                class: "c_000 bg_f3d",
                sortable: name === "今天所有村落浆员" ? true : false,
                title: '当期进站人数',
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                field: "lastTimePNum",
                class: "c_000 bg_f3d",
                sortable: name === "今天所有村落浆员" ? true : false,
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                title: '同期进站人数',
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                field: 'currentTimeCollNum',
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                align: "center",
                title: '当期浆量/袋',
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                field: 'lastTimeCollNum',
                title: '同期浆量/袋',
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                field: 'collNumDiff',
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                class: "c_000 bg_f3d",
                title: '当期与同期浆量差/袋',
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                field: 'currentTimeAddPNum',
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                title: '当期新增人数',
                class: "c_000 bg_d9e",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                field: 'lastTimeAddPNum',
                class: "c_000 bg_d9e",
                sortable: name === "今天所有村落浆员" ? true : false,
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                title: '同期新增人数',
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "新增浆员当期与同期差/袋",
                class: "c_000 bg_d9e",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "addNumDiff",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                field: 'currentTimeAddCollNum',
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                class: "c_000 bg_d9e",
                title: '当期新增浆量/袋',
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "同期新增浆量/袋",
                class: "c_000 bg_d9e",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "lastTimeAddCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "当期复苏浆员总人数",
                class: "c_000 bg_d1c",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "currentTimeFuSuPNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "当期复苏浆员浆量/袋",
                class: "c_000 bg_d1c",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "currentTimeFuSuCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "忠诚浆员当期总人数",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "currentTimeZCPNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "忠诚浆员同期总人数",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "lastTimeZCPNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "忠诚浆员当期浆量/袋",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "currentTimeZCCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "忠诚浆员同期浆量/袋",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "lastTimeZCCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "忠诚浆员浆量当期与同期差/袋",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "zcCollNumDiff",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "忠诚浆员去年浆量/袋",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "lastYearZCCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "当期未进站总人数",
                class: "c_000 bg_f9c",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "currentTimeNotComedPNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "当期未进站总人数去年浆量/袋",
                class: "c_000 bg_f9c",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.56%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "currentTimeNotComedPLastYearCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "休眠浆员总人数",
                class: "c_000 bg_d9e",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "xiuMianPNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "休眠浆员去年浆量/袋",
                class: "c_000 bg_d9e",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "lastYearXiuMianCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "休眠浆员同期浆量/袋",
                class: "c_000 bg_d9e",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "lastTimeXiuMianCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "流失浆员总人数",
                class: "c_000 bg_d1c",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "liuShiPNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "进站未链接浆员",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "comedNotConnPNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "进站未链接浆员当期浆量/袋",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "comedNotConnThisTimeCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "进站未链接浆员同期浆量/袋",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "comedNotConnLastTimeCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "进站未链接浆员去年浆量/袋",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "comedNotConnLastYearCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "已链接休眠的浆员人数",
                class: "c_000 bg_d9e",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "connXMPNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "已链接休眠的浆员同期浆量/袋",
                class: "c_000 bg_d9e",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "lastTimeConnXMCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "未链接休眠的浆员人数",
                class: "c_000 bg_d1c",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "notConnXMPNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "未链接休眠的浆员同期浆量/袋",
                class: "c_000 bg_d1c",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "lastTimeNotConnXMCollNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "管理护士总人数",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "connNurseNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "已链接浆员总人数",
                class: "c_000 bg_f3d",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "connedPNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }

            },
            {
                title: "义工总人数",
                class: "c_000 bg_f9c",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "volunteerNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }
            },
            {
                title: "义工管理浆员总人数",
                class: "c_000 bg_f9c",
                width: name === "今天所有村落浆员" ? "2.3%" : "2.57%",
                sortable: name === "今天所有村落浆员" ? true : false,
                field: "volunConnGJZNum",
                formatter: function (value, row, index) {
                    return value === 0 ? "" : value
                }

            }
        ]
    });

    //判断是不是展示村名字
    if (name !== "今天所有村落浆员") {
        $("#thisTown thead th:first-child").hide();
        $("#thisTown thead th:nth-child(2)").hide();
        $("#thisTown tbody td:first-child").hide();
        $("#thisTown tbody td:nth-child(2)").hide();
    } else {
        $("#thisTown thead th:first-child").show();
        $("#thisTown thead th:nth-child(2)").show();
        $("#thisTown tbody td:first-child").show();
        $("#thisTown tbody td:nth-child(2)").show();
    }

    //bottom table
    $("#table").bootstrapTable('destroy').bootstrapTable({
        cache: false,
        data: roundTable,
        height: (name === "今天所有村落浆员") ? ((bodyclientH - 70 - $("#coverTable>h1").height()) / 2) : ( bodyclientH - 80 - $("#thisTown").height() - $("#coverTable>h1").height()),
        undefinedText: "",
        sortName: "times",
        onPostHeader: function () {
            //标记轮次
            getRoundAjax(function (item) {
                $("th[data-field=round" + item.thisRound + "]").css("background", "rgb(54, 142, 78)");
            });
        },
        onPostBody: function () {
            //添加class pulp-name-class
            $('.pulp-name-class').on('dblclick', function () {
                $(this).parents('tr').find(".pulp-name").addClass($(this).data("row"));
            }).trigger('dblclick');
            //manageNurse,生成护士下拉列表
            getNurseList(function (item) {
                var nurseHtml = "<option value=''>空</option>";
                for (var nur = 0; nur < item.length; nur++) {
                    nurseHtml += "<option value='" + item[nur].nurseId + "'>" + item[nur].nurseName + "</option>";
                }
                $("select[name=manageNurse]").html(nurseHtml);
                $('select[name="manageNurse"][value]').each(function () {
                    $(this).find('option[value="' + $(this).attr('value') + '"]').prop('selected', true);
                });
            });
            //importantPlup,生成重点浆员下拉列表
            getImportPulpData(function (item) {
                var importHtml = "<option value=''>空</option>";
                for (var i = 0; i < item.length; i++) {
                    importHtml += "<option value='" + item[i].code + "'>" + item[i].name + "</option>";
                }
                $("select[name=importantPlup]").html(importHtml);
                $('select[name="importantPlup"][value]').each(function () {
                    $(this).find('option[value="' + $(this).attr('value') + '"]').prop('selected', true);
                });
            });
            //hidePlaceholder
            placeholder.hide(document.body);
            $(".vii-holder-mask").hide();
        },
        columns: [
            {
                width: "2%",
                class: "",
                title: '序号',
                sortable: true,
                formatter: function (value, row, index) {
                    return index + 1;
                }
            },
            {
                field: "providerNo",
                title: '卡号',
                class: "",
                sortable: true,
                width: "4%"
            },
            {
                field: 'name',
                width: "4%",
                class: "pulp-name",
                sortable: true,
                title: '姓名',
            },
            {
                field: "villId",
                class: "",
                width: "4%",
                sortable: true,
                title: '重点浆员类型',
                formatter: function (value, row, index) {
                    return "<div><select name='importantPlup' class='importPulp" + row.providerNo + "'  " + ( row.villId ? "value='" + row.villId + "'" : "" ) + "></select></div>";
                }
            },
            {
                field: 'age',
                class: "",
                sortable: true,
                width: "2%",
                title: '年龄'
            },
            {
                field: 'sex',
                title: '性别',
                sortable: true,
                class: "",
                width: "2%",
            },
            {
                field: 'pulpAge',
                width: "2%",
                class: "",
                sortable: true,
                title: '浆龄'
            },
            {
                field: 'currentTimePulps',
                width: "2%",
                sortable: true,
                title: '今年当期总次数',
                class: "bg_2f9",
            },
            {
                field: 'lastTimePulps',
                class: "bg_2f9",
                sortable: true,
                width: "3%",
                title: '去年同期总次数'
            },
            {
                field: 'lastYearPulps',
                sortable: true,
                width: "3%",
                class: "bg_2f9",
                title: '去年献浆总次数',
            },
            {
                title: "献浆总次数",
                sortable: true,
                class: "bg_2f9",
                width: "3%",
                field: "times",
            },
            {
                title: "献浆员类型",
                class: "",
                sortable: true,
                width: "3%",
                field: "gjzType"
            },
            {
                title: "管理护士姓名",
                class: "",
                sortable: true,
                width: "4%",
                field: "manageNurse",
                formatter: function (value, row, index) {
                    var html = "<div onmouseover='mouseoverToast(this,\"" + ("修改历史") + "\")' onmouseout='mouseoutToast(this)' ><select name='manageNurse' class='nurse" + row.providerNo + "'  " + ( row.manageNurseId ? "value='" + row.manageNurseId + "'" : "" ) + "></select><span onclick='openNurseHistory(\"" + row.providerNo + "\")' class='placehold-communication cursor' ></span></div>";
                    return html;
                }
            },
            {
                title: "管理义工姓名",
                class: "round-volunteer",
                width: "4%",
                sortable: true,
                field: "yiGong",
                formatter: function (value, row, index) {
                    var html = "<div class='cursor' onmouseover='mouseoverToast(this,\"" + ("修改义工") + "\")' onmouseout='mouseoutToast(this)'><span data-yigongid='" + (row.yiGongId ? row.yiGongId : "") + "'>" + (row.yiGong ? row.yiGong : "") + "</span><span onclick='openVolunteer(this,\"" + row.providerNo + "\")' class='placehold-communication cursor' ></span></div>";
                    return html;
                }
            },
            {
                title: "介绍人姓名",
                class: "",
                width: "4%",
                sortable: true,
                field: "jsr"
            },
            {
                title: "分组编号",
                class: "",
                width: "2%",
                sortable: true,
                field: "jbGroup"
            },
            {
                title: "最新沟通内容",
                class: "",
                width: "5%",
                sortable: true,
                field: "communResult",
                formatter: function (value, row, index) {
                    var html = "<div " + (value ? "onmouseover='mouseoverToast(this,\"" + value + "\")'" : "") + "  onmouseout='mouseoutToast(this)'><span class='cursor' onclick='" + ( row.communResult ? "openNotPulpCommunication(\"" + row.providerNo + "\")" : "") + "'>" + (value ? (value.length > 5 ? (value.substr(0, 5) + "...") : value) : "") + "</span><span class='placehold-communication'></span></div>";
                    return html;
                }
            },
            {
                title: "详细地址",
                class: "",
                width: "8%",
                sortable: true,
                field: "address"
            },
            {
                title: "1",
                class: "roundID",
                field: "round1",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound1, row.round1);
                }
            },
            {
                title: "2",
                class: "roundID",
                sortable: true,
                field: "round2",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound2, row.round2);
                }
            },
            {
                title: "3",
                class: "roundID",
                sortable: true,
                field: "round3",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound3, row.round3);
                }
            },
            {
                title: "4",
                class: "roundID",
                sortable: true,
                field: "round4",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound4, row.round4);
                }
            },
            {
                title: "5",
                class: "roundID",
                sortable: true,
                field: "round5",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound5, row.round5);
                }
            },
            {
                title: "6",
                class: "roundID",
                field: "round6",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound6, row.round6);
                }
            },
            {
                title: "7",
                class: "roundID",
                field: "round7",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound7, row.round7);
                }
            },
            {
                title: "8",
                class: "roundID",
                field: "round8",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound8, row.round8);
                }
            },
            {
                title: "9",
                class: "roundID",
                field: "round9",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound9, row.round9);
                }
            },
            {
                title: "10",
                class: "roundID",
                field: "round10",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound10, row.round10);
                }
            },
            {
                title: "11",
                class: "roundID",
                sortable: true,
                field: "round11",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound11, row.round11);
                }
            },
            {
                title: "12",
                class: "roundID",
                sortable: true,
                field: "round12",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound12, row.round12);
                }
            },
            {
                title: "13",
                class: "roundID",
                field: "round13",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound13, row.round13);
                }
            },
            {
                title: "14",
                class: "roundID",
                sortable: true,
                field: "round14",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound14, row.round14);
                }
            },
            {
                title: "15",
                class: "roundID",
                field: "round15",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound15, row.round15);
                }
            },
            {
                title: "16",
                class: "roundID",
                field: "round16",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound16, row.round16);
                }
            },
            {
                title: "17",
                class: "roundID",
                field: "round17",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound17, row.round17);
                }
            },
            {
                title: "18",
                class: "roundID",
                sortable: true,
                field: "round18",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound18, row.round18);
                }

            },
            {
                title: "19",
                class: "roundID",
                field: "round19",
                sortable: true,
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound19, row.round19);
                }

            },
            {
                title: "20",
                class: "roundID",
                sortable: true,
                field: "round20",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound20, row.round20);
                }

            },
            {
                title: "21",
                class: "roundID",
                sortable: true,
                field: "round21",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound21, row.round21);
                }
            },
            {
                title: "22",
                class: "roundID",
                sortable: true,
                field: "round22",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound22, row.round22);
                }
            },
            {
                title: "23",
                class: "roundID",
                sortable: true,
                field: "round23",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound23, row.round23);
                }

            },
            {
                title: "24",
                class: "roundID",
                sortable: true,
                field: "round24",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound24, row.round24);
                }

            },
            {
                title: "25",
                class: "roundID",
                sortable: true,
                field: "round25",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound25, row.round25);
                }

            },
            {
                title: "26",
                class: "roundID",
                sortable: true,
                field: "round26",
                formatter: function (value, row, index) {
                    return getRoundEle(value, row, index, row.lastRound26, row.round26);
                }

            }
        ]
    });
}

/*
* coverTableSelect
* 切换全部浆员分类事件
* */
$("#coverTableSelect").on("change", function () {
    TableChartAjax(tableAdd, "all", parseInt($(this).val()) > 0 ? $(this).val() : "");
});

/*
* coverTable button
* 修改轮次信息 表格提交
* */
$("#coverTable button").on("click", function () {
    var selected = [];
    $("#table select[name=manageNurse]").each(function () {
        selected.push({
            providerNo: $(this).attr("class").substr(5),
            nurseId: $(this).val()
        })
    });
    var _h1 = $("#coverTable>h1").text();
    var index1 = _h1.indexOf("：");
    var index2 = _h1.indexOf("（");
    setManageNurse(selected, function (item) {
        TableChartAjax(_h1.substring(index1 + 1, index2), tablebuttonMsg.type, tablebuttonMsg.t);
    });
});


/*
* window.onresize
* 窗口大小改变时，对话框始终居中
* */
window.onresize = function () {
    autoCenter($("#popup"));
    autoCenter($("#popup1"));
};



